<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body{
            height: 100%;
        }
        .a{
            height: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;/*水平*/
            /* 高度可以设置百分比 */
            align-content: flex-start;/*垂直内容对齐方式*/
            align-items: center;
        }
        .b{
            width: 10%;
            height: 10%;
            background: rgb(123, 118, 117);
            margin: 20px;
        }
        .c{
            display: flex;
            height: 200px;
        }
        .d{
            width: 100px;
            height: 200px;
            background-color: pink;
        }
        .e{
            /* 设置了flex:1的元素会占据剩下的所有空间 */
            flex: 1;
            height: 200px;
            background: green;
        }
    </style>
</head>
<body>
    <div class="a">
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
        <div class="b"></div>
    </div>
    <div class="c">
        <div class="d"></div>
        <div class="e"></div>
    </div>
</body>
</html>